﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Recipe.aspx.vb" Inherits="kitchenCompetition.Recipe" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
 <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Always" ChildrenAsTriggers="True">
            <ContentTemplate>
<table width="100%" >
    <tr>
        <td>
            <h1>Rate this Recipe</h1>
        </td>
    </tr>
    <tr>
        <td>
            
            <table>
                <tr>
                    <td>Show All</td>
                    <td><asp:DropDownList ID="ddlRecipe" runat="server">
                    <asp:ListItem Value="0" Text="All Recipe" ></asp:ListItem>
            </asp:DropDownList></td>
                    <td><asp:Button ID="btnShowAll" runat="server" Text="Show All Recipe" /></td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td valign="top" align="left" >
            <asp:Repeater ID="rpRecipe"   runat="server">
            <ItemTemplate>
                <table width="100%"  >
                    <tr valign="top" >
                        <td><h1>Recipe Name</h1></td><td><h1><%#Eval("RecipeName")%></h1></td>
                        <td rowspan="5" ><asp:Image ID="Image1" Width="300px" Height="300px" ImageUrl='<%#Eval("Pic")%>' runat="server" /></td>
                    </tr>
                    
                    <tr valign="top">
                        <td>Recipe</td><td><%#Eval("Recipe")%></td>
                    </tr>
                    <tr valign="top">
                        <td>Price</td><td><%#Eval("Price")%></td>
                    </tr >
                    <tr valign="top">
                        <td>Duration</td><td><%#Eval("Duration")%></td>
                    </tr>
                    <tr>
                        <td>Please rate</td>
                        <td><asp:Rating ID="Rating1" runat="server" 
                        BehaviorID='<%#Eval("id")%>'
                        OnChanged="Rating1_Changed"
                         MaxRating="6"
                    CurrentRating='<%#Eval("currentrating")%>'
                    
                    CssClass="ratingStar"
                    StarCssClass="ratingItem"
                    WaitingStarCssClass="Saved"
                    FilledStarCssClass="Filled"
                    EmptyStarCssClass="Empty" AutoPostBack="True"
                    >
                        </asp:Rating></td>
                        
                    </tr>
                </table>
                <table>
                    <tr>
                        <td colspan=2 >
                        <hr />
                        </td>
                    </tr>
                </table>
            </ItemTemplate>
            </asp:Repeater>
        </td>
    </tr>
</table>

</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
